<template>
  <myPie :data="state.salePie" />
  <MyMap :data="state.saleMap" />
</template>

<script lang="ts" setup>
import { reactive, toRefs, ref } from "vue";
import { getAdminStat } from "../../request/api";
import myPie from "../../views/ums/components/myPie.vue";
import MyMap from "../ums/components/myMap.vue";

const state = reactive<{
  salePie: {}[];
  saleMap: {}[];
}>({ salePie: [], saleMap: [] });
getAdminStat().then((res) => {
  if (res.errno == 0) {
    state.salePie = res.data.salePie;
    state.saleMap = res.data.saleMap;
  }
});
</script>

<style lang="less" scoped></style>
